package com.nit.lab.entity.basic;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class UserEntity {
    private Long userId;
    private String loginName;
    private String loginPwd;
    private Long roleId;
    private Long unitId;
    private Long unitFather;
    private Long unitType;
    private String userName;
    private String unitName;
    private Long userType;
    private String userImage;
    private String userInfo;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtCreate;
    private Date gmtModified;

    private String publicKey;

    private String privateKey;

    private String openId;

    private  String userUnit;


    public UserEntity(Long userId, String loginName, String loginPwd, Long roleId, Long unitId, Long unitFather, Long unitType, String userName, String unitName, Long userType, String userImage, String userInfo, Date gmtCreate, Date gmtModified, String publicKey, String privateKey, String openId) {
        this.userId = userId;
        this.loginName = loginName;
        this.loginPwd = loginPwd;
        this.roleId = roleId;
        this.unitId = unitId;
        this.unitFather = unitFather;
        this.unitType = unitType;
        this.userName = userName;
        this.unitName = unitName;
        this.userType = userType;
        this.userImage = userImage;
        this.userInfo = userInfo;
        this.gmtCreate = gmtCreate;
        this.gmtModified = gmtModified;
        this.publicKey = publicKey;
        this.privateKey = privateKey;
        this.openId = openId;
    }

    public UserEntity(String loginName, String loginPwd, Long roleId, String userName, Long userType, String userInfo, String publicKey, String privateKey, String openId , String userUnit) {
        this.loginName = loginName;
        this.loginPwd = loginPwd;
        this.roleId = roleId;
        this.userName = userName;
        this.userType = userType;
        this.userInfo = userInfo;
        this.publicKey = publicKey;
        this.privateKey = privateKey;
        this.openId = openId;
        this.userUnit = userUnit;
    }

    public UserEntity() {
    }

    public UserEntity(Long userId, String loginName, String loginPwd, Long roleId, Long unitId, Long unitFather, Long unitType, String userName, String unitName, Long userType, String userImage, String userInfo, Date gmtCreate, Date gmtModified, String publicKey, String privateKey, String openId, String userUnit) {
        this.userId = userId;
        this.loginName = loginName;
        this.loginPwd = loginPwd;
        this.roleId = roleId;
        this.unitId = unitId;
        this.unitFather = unitFather;
        this.unitType = unitType;
        this.userName = userName;
        this.unitName = unitName;
        this.userType = userType;
        this.userImage = userImage;
        this.userInfo = userInfo;
        this.gmtCreate = gmtCreate;
        this.gmtModified = gmtModified;
        this.publicKey = publicKey;
        this.privateKey = privateKey;
        this.openId = openId;
        this.userUnit = userUnit;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public Long getUnitFather() {
        return unitFather;
    }

    public void setUnitFather(Long unitFather) {
        this.unitFather = unitFather;
    }

    public Long getUnitType() {
        return unitType;
    }

    public void setUnitType(Long unitType) {
        this.unitType = unitType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public Long getUserType() {
        return userType;
    }

    public void setUserType(Long userType) {
        this.userType = userType;
    }

    public String getUserImage() {
        return userImage;
    }

    public void setUserImage(String userImage) {
        this.userImage = userImage;
    }

    public String getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(String userInfo) {
        this.userInfo = userInfo;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getUserUnit() {
        return userUnit;
    }

    public void setUserUnit(String userUnit) {
        this.userUnit = userUnit;
    }

    @Override
    public String toString() {
        return "UserEntity{" +
                "userId=" + userId +
                ", loginName='" + loginName + '\'' +
                ", loginPwd='" + loginPwd + '\'' +
                ", roleId=" + roleId +
                ", unitId=" + unitId +
                ", unitFather=" + unitFather +
                ", unitType=" + unitType +
                ", userName='" + userName + '\'' +
                ", unitName='" + unitName + '\'' +
                ", userType=" + userType +
                ", userImage='" + userImage + '\'' +
                ", userInfo='" + userInfo + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                ", publicKey='" + publicKey + '\'' +
                ", privateKey='" + privateKey + '\'' +
                ", openId='" + openId + '\'' +
                ", userUnit='" + userUnit + '\'' +
                '}';
    }
}
